﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="WorkTime_YearHoliday.aspx.cs" Inherits="WorkTime_WorkTime_YearHoliday" %>

<%@ Register Assembly="ZLTextBox" Namespace="BaseText" TagPrefix="cc1" %>
<%@ Register Src="../Control/DepartmentDList.ascx" TagName="DepartmentDList" TagPrefix="uc2" %>
<%@ Register Src="../Control/SelUser.ascx" TagName="SelUser" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Titile" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" runat="Server">
    <infolight:webdatasource id="Master" runat="server" autoapply="True" webdatasetid="WMaster"
        allowadd="True" allowdelete="True" allowprint="True" allowupdate="True" alwaysclose="False"
        autoapplyforinsert="False" autorecordlock="False" autorecordlockmode="NoneReload"
        cachedataset="True" commandname="" commandtext="" datamember="WorkTime_YearHoliday"
        eof="True" keyvalues="" lastindex="-1" marker="'" masterdatasource="" packetrecords="100"
        quoteprefix="[" quotesuffix="]" remotename="" selectcommand="" tablename="">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsWorkTime_YearHolidayEmployeeId" runat="server" selectalias="Usasdb"
        selectcommand="select Employees.EmployeeID,Employees.EmpName,Department.DepartmentName FROM Employees&#13;&#10; left join Department on Employees.DepartmentId=Department.DepartmentId"
        cachedataset="True">
    </infolight:webdatasource>
    <infolight:webdatasource id="wdsWorkTime_SV_YearTypeDataType" runat="server" selectalias="Usasdb"
        selectcommand="Select * from [WorkTime_SV_YearType]" cachedataset="True">
    </infolight:webdatasource>
    <infolight:webclientquery id="ClientQuery" runat="server" datasourceid="Master">
        <columns>
                <InfoLight:WebQueryColumns Caption="年份" Column="Years" DefaultValue="" NewLine="True"
                    NotNull="False" NotNullBackColor="White" Text="" Width="120" />
                <InfoLight:WebQueryColumns Caption="薪假天数" Column="Days" DefaultValue="" NewLine="True"
                    NotNull="False" NotNullBackColor="White" Text="" Width="120" />
                <InfoLight:WebQueryColumns Caption="部门名称" Column="DepartmentName" DefaultValue=""
                    NewLine="True" NotNull="False" NotNullBackColor="White" Operator="%%" Text=""
                    Width="120" />
                <InfoLight:WebQueryColumns Caption="薪假数据类型" Column="DataType" ColumnType="ClientQueryComboBoxColumn"
                    DefaultValue="" NewLine="True" NotNull="False" NotNullBackColor="White" Text=""
                    WebRefVal="QueryDataType1" Width="120" />
                <InfoLight:WebQueryColumns Caption="员工工号" Column="EmployeeId" ColumnType="ClientQueryRefValColumn"
                    DefaultValue="" NewLine="True" NotNull="False" NotNullBackColor="White" Text="" Width="120" WebRefVal="QueryEmp" />
            </columns>
    </infolight:webclientquery>
    <infolight:webdefault id="WebDefault1" runat="server" datamember="WorkTime_YearHoliday"
        datasourceid="Master" carryonactive="True">
        <fields>
                <InfoLight:DefaultFieldItem DefaultValue="0" FieldName="Id" />
                <InfoLight:DefaultFieldItem CarryOn="True" DefaultValue="2008" FieldName="Years" />
                <InfoLight:DefaultFieldItem CarryOn="True" FieldName="Days" />
                <InfoLight:DefaultFieldItem CarryOn="True" FieldName="DataType" />
            </fields>
    </infolight:webdefault>
    <infolight:webrefval id="QueryDataType1" runat="server" datasourceid="wdsWorkTime_SV_YearTypeDataType"
        datatextfield="Name" datavaluefield="Id" visible="False" width="144px">
        <columns>
                <InfoLight:WebRefColumn ColumnName="Id" HeadText="编号" Width="100" />
                <InfoLight:WebRefColumn ColumnName="Name" HeadText="薪假名称" Width="100" />
            </columns>
    </infolight:webrefval>
    <infolight:webnavigator id="WebNavigator1" runat="server" bindingobject="wgvMaster"
        width="100%" statusstrip="WebStatusStrip1" showdatastyle="GridStyle" oncommand="WebNavigator1_Command"
        querymode="ClientQuery" cssclass="NavigatorBar" ctlheight="25">
        <navstates>
                <InfoLight:WebNavigatorStateItem StateText="Initial" />
                <InfoLight:WebNavigatorStateItem StateText="Browsed" />
                <InfoLight:WebNavigatorStateItem StateText="Inserting" />
                <InfoLight:WebNavigatorStateItem StateText="Editing" />
                <InfoLight:WebNavigatorStateItem StateText="Applying" />
                <InfoLight:WebNavigatorStateItem StateText="Changing" />
                <InfoLight:WebNavigatorStateItem StateText="Querying" />
                <InfoLight:WebNavigatorStateItem StateText="Printing" />
            </navstates>
        <navcontrols>
                <InfoLight:ControlItem ControlName="Add" ControlText="穝糤" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/add_C.gif" MouseOverImageUrl="../image/uipics/add2_C.gif"
                    Size="48" disenableimageurl="../Image/UIPics/add3_C.gif"/>
                <InfoLight:ControlItem ControlName="Apply" ControlText="郎" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/apply_C.gif" MouseOverImageUrl="../image/uipics/apply2_C.gif"
                    Size="48" disenableimageurl="../Image/UIPics/apply3_C.gif"/>
                <InfoLight:ControlItem ControlName="Abort" ControlText="斌" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/abort_C.gif" MouseOverImageUrl="../image/uipics/abort2_C.gif"
                    Size="48" disenableimageurl="../Image/UIPics/abort3_C.gif"/>
                <InfoLight:ControlItem ControlName="Query" ControlText="琩高" ControlType="Image" ControlVisible="False"
                    ImageUrl="../image/uipics/query_C.gif" MouseOverImageUrl="../image/uipics/query2_C.gif"
                    Size="48" disenableimageurl="../Image/UIPics/query3_C.gif"/>
                <InfoLight:ControlItem ControlName="Print" ControlText="ゴ" ControlType="Image" ControlVisible="True"
                    ImageUrl="../image/uipics/print_C.gif" MouseOverImageUrl="../image/uipics/print2_C.gif"
                    Size="48" disenableimageurl="../Image/UIPics/print3_C.gif"/>
                <InfoLight:ControlItem ControlName="ClientQuery" ControlText="ClientQuery" ControlType="Image"
                    ControlVisible="True" DisenableImageUrl="../Image/UIPics/Query3_C.gif" ImageUrl="../Image/UIPics/Query_C.gif"
                    MouseOverImageUrl="../Image/UIPics/Query2_C.gif" Size="48" />
            </navcontrols>
        <queryfields>
        <InfoLight:WebQueryField Caption="编号" Condition="" DefaultValue="" FieldName="Id"
            Mode="" />
        <InfoLight:WebQueryField Caption="员工编号" Condition="=" DefaultValue="" FieldName="EmployeeId"
            Mode="RefVal" RefVal="QueryEmp" />
        <InfoLight:WebQueryField Caption="年份" Condition="" DefaultValue="" FieldName="Years"
            Mode="" />
        <InfoLight:WebQueryField Caption="薪假天数" Condition="" DefaultValue="" FieldName="Days"
            Mode="" />
        <InfoLight:WebQueryField Caption="部门名称" Condition="" DefaultValue="" FieldName="DepartmentName"
            Mode="" />
    </queryfields>
    </infolight:webnavigator>
    <asp:Panel ID="Panel1" runat="server" Width="95%">
        <infolight:webvalidate id="wvWorkTime_YearHoliday" runat="server" datamember="WorkTime_YearHoliday"
            datasourceid="Master" forecolor="Red" validatechar="*" altrowcss="messageTip"
            rowcss="messageTip">
            <fields>
<InfoLight:ValidateFieldItem FieldName="Id" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="EmployeeId" CheckNull="True"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="Years" CheckNull="True" WarningMsg="输入正确年份!" CheckRangeFrom="2007" CheckRangeTo="2100"></InfoLight:ValidateFieldItem>
<InfoLight:ValidateFieldItem FieldName="Days" CheckRangeFrom="-10" CheckRangeTo="300"></InfoLight:ValidateFieldItem>
</fields>
        </infolight:webvalidate>
        <infolight:validatefielditem checknull="True" fieldname="Id">
        </infolight:validatefielditem>
        <infolight:validatefielditem checknull="True" fieldname="EmployeeId">
        </infolight:validatefielditem>
        <infolight:validatefielditem checknull="True" checkrangefrom="2007" checkrangeto="2100"
            fieldname="Years" warningmsg="输入正确年份!">
        </infolight:validatefielditem>
        <infolight:validatefielditem checkrangefrom="-10" checkrangeto="300" fieldname="Days">
        </infolight:validatefielditem>
        <infolight:validatefielditem checknull="True" fieldname="Id">
        </infolight:validatefielditem>
        <infolight:validatefielditem checknull="True" fieldname="EmployeeId">
        </infolight:validatefielditem>
        <infolight:validatefielditem checknull="True" checkrangefrom="2007" checkrangeto="2100"
            fieldname="Years" warningmsg="输入正确年份!">
        </infolight:validatefielditem>
        <infolight:validatefielditem checkrangefrom="-10" checkrangeto="300" fieldname="Days">
        </infolight:validatefielditem>
    </asp:Panel>
    <table cellpadding="0" cellspacing="5" class="TbSearch">
        <tr>
           <td style="width: 40px;" align="right">
                <asp:Label ID="LLabel1" runat="server" Text="年份:" Width="30px"></asp:Label>
            </td>
            <td align="right" style="width: 71px;" valign="middle">
                <asp:DropDownList ID="DlYear" runat="server" Width="60px">
                    <asp:ListItem>2007</asp:ListItem>
                    <asp:ListItem Selected="True">2008</asp:ListItem>
                    <asp:ListItem>2009</asp:ListItem>
                    <asp:ListItem>2010</asp:ListItem>
                    <asp:ListItem>2011</asp:ListItem>
                    <asp:ListItem>2012</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 40px;" align="right">
                <asp:Label ID="Label3" runat="server" Text="员工:"></asp:Label>
            </td>
            <td style="width: 79px;">
                <uc1:SelUser ID="SelUser" runat="server" />
            </td>
         <td style="width: 40px;" align="right">
                <asp:Label ID="LLabel3" runat="server" Text="部门:" Width="35px"></asp:Label>
            </td>
            <td align="center" style="width: 46px;">
                <uc2:DepartmentDList ID="DepartmentDList1" runat="server" />
            </td>
            <td align="center" style="width: 280px;">
                <span class="roundbtn">
                    <asp:LinkButton ID="Refresh" runat="server" Text=" 筛 选 " OnClick="Refresh_Click"></asp:LinkButton>
                </span>
            </td>
           
        </tr>
    </table>
    <infolight:webgridview id="wgvMaster" runat="server" cellpadding="1" datasourceid="Master"
        forecolor="#333333" width="100%" aborticonurl="../Image/UIPics/Abort.gif" addiconurl="../Image/UIPics/Add.gif"
        applyiconurl="../Image/UIPics/Apply.gif" canceliconurl="../Image/UIPics/Cancel.gif"
        mouseoveraborticonurl="../Image/UIPics/Abort2.gif" mouseoveraddiconurl="../Image/UIPics/Add2.gif"
        mouseoverapplyiconurl="../Image/UIPics/Apply2.gif" mouseovercanceliconurl="../Image/UIPics/Cancel2.gif"
        mouseoverokiconurl="../Image/UIPics/OK2.gif" mouseoverqueryiconurl="../Image/UIPics/Query2.gif"
        okiconurl="../Image/UIPics/OK.gif" queryiconurl="../Image/UIPics/Query.gif" headerstylewrap="False"
        backcolor="White" bordercolor="White" borderstyle="Groove" borderwidth="2px"
        datamember="WorkTime_YearHoliday" allowsorting="True" pagesize="15">
        <pagersettings mode="NumericFirstLast" />
        <footerstyle backcolor="#507CD1" forecolor="White" font-bold="True"></footerstyle>
        <navcontrols>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/add2.gif" ControlText="add" ControlName="Add" ControlType="Image" ImageUrl="../image/uipics/add.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/ok2.gif" ControlText="Insert" ControlName="OK" ControlType="Image" ImageUrl="../image/uipics/ok.gif"></InfoLight:ControlItem>
<InfoLight:ControlItem ControlVisible="True" Size="25" MouseOverImageUrl="../image/uipics/cancel2.gif" ControlText="cancel" ControlName="Cancel" ControlType="Image" ImageUrl="../image/uipics/cancel.gif"></InfoLight:ControlItem>
</navcontrols>
        <columns>
<asp:TemplateField ShowHeader="False"><EditItemTemplate>
<asp:ImageButton id="ImageButton1" runat="server" Text="Update" CausesValidation="True" ImageUrl="~/Image/UIPics/OK.gif" CommandName="Update" __designer:wfdid="w3"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton2" runat="server" Text="Cancel" CausesValidation="False" ImageUrl="~/Image/UIPics/Cancel.gif" CommandName="Cancel" __designer:wfdid="w4"></asp:ImageButton>
</EditItemTemplate>
    <headerstyle wrap="False" />
<ItemTemplate>
<asp:ImageButton id="ImageButton3" runat="server" CommandName="Edit" Text="Edit" __designer:wfdid="w1" CausesValidation="False" ImageUrl="~/Image/UIPics/Edit.gif"></asp:ImageButton>&nbsp;<asp:ImageButton id="ImageButton4" runat="server" CommandName="Delete" Text="Delete" __designer:wfdid="w2" CausesValidation="False" ImageUrl="~/Image/UIPics/icon_delete.gif" ImageAlign="AbsMiddle"></asp:ImageButton> 
</ItemTemplate>
</asp:TemplateField>
                <asp:BoundField DataField="Id" HeaderText="编号" SortExpression="Id" ReadOnly="True" />
                <asp:TemplateField HeaderText="员工" SortExpression="EmployeeId">
                    <edititemtemplate>
<InfoLight:WebRefVal id="wrvWorkTime_YearHolidayEmployeeIdE" runat="server" Width="80px" DataSourceID="wdsWorkTime_YearHolidayEmployeeId" ReadOnly="True" MultiLanguage="False" ResxFilePath="" BindingText="" ButtonImageUrl="../Image/refval/RefVal.gif" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName" __designer:wfdid="w2" DataBindingField="EmployeeId"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal> 
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebRefVal id="wrvWorkTime_YearHolidayEmployeeIdF" runat="server" Width="80px" DataSourceID="wdsWorkTime_YearHolidayEmployeeId" ReadOnly="False" MultiLanguage="False" ResxFilePath="" BindingText="" ButtonImageUrl="../Image/refval/RefVal.gif" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName" __designer:wfdid="w3" DataBindingField="EmployeeId"><Columns>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal> 
</footertemplate>
                    <itemtemplate>
<InfoLight:WebRefVal id="wrvWorkTime_YearHolidayEmployeeId" runat="server" Width="80px" BorderStyle="None" BackColor="Transparent" DataSourceID="wdsWorkTime_YearHolidayEmployeeId" ReadOnly="True" MultiLanguage="False" ResxFilePath="" BindingText="" ButtonImageUrl="../Image/refval/RefVal.gif" DataValueField="EmployeeID" UpdatePanelID="" ResxDataSet="" BindingValue='<%# Bind("EmployeeId") %>' UseButtonImage="True" PostBackButonClick="False" AllowAddData="False" DataTextField="EmpName" __designer:wfdid="w1" DataBindingField="EmployeeId"><Columns>
<InfoLight:WebRefColumn HeadText="所在部门" ColumnName="DepartmentName" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工编号" ColumnName="EmployeeID" Width="100"></InfoLight:WebRefColumn>
<InfoLight:WebRefColumn HeadText="员工姓名" ColumnName="EmpName" Width="100"></InfoLight:WebRefColumn>
</Columns>
</InfoLight:WebRefVal> 
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="年份" SortExpression="Years">
                    <edititemtemplate>
<cc1:ZLTextBox id="ZLYears" language="English" runat="server" Width="80px" Text='<%# Bind("Years") %>' __designer:wfdid="w3" MaxLength="4" InputType="number"></cc1:ZLTextBox> 
</edititemtemplate>
                    <footertemplate>
<cc1:ZLTextBox id="ZLYears" language="English" Text='<%# Bind("Years") %>' runat="server" Width="80px" __designer:wfdid="w9" InputType="number" MaxLength="4"></cc1:ZLTextBox>
</footertemplate>
                    <itemtemplate>
<asp:Label id="Label1" runat="server" Text='<%# Bind("Years") %>' __designer:wfdid="w7"></asp:Label> 
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="薪假天数" SortExpression="Days">
                    <edititemtemplate>
<asp:TextBox id="TextBox1" runat="server" Width="48px" Text='<%# Bind("Days") %>' __designer:wfdid="w4"></asp:TextBox>
</edititemtemplate>
 <footertemplate>
<asp:TextBox id="TextBox1" runat="server" Width="48px" Text='<%# Bind("Days") %>' __designer:wfdid="w5"></asp:TextBox>
</footertemplate>
                    <itemtemplate>
<asp:Label id="Label2" runat="server" Text='<%# Bind("Days") %>' __designer:wfdid="w1"></asp:Label> 
</itemtemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="薪假数据类型" SortExpression="DataType">
                    <edititemtemplate>
<InfoLight:WebDropDownList id="wddWorkTime_YearHolidayDataTypeE" runat="server" DataMember="WorkTime_SV_YearType" Width="130px" DataSourceID="wdsWorkTime_SV_YearTypeDataType" DataValueField="Id" DataTextField="Name" FilterObject="" Filter="" DriverObject="" AutoInsertEmptyData="False" __designer:wfdid="w87" SelectedValue='<%# Bind("DataType") %>'></InfoLight:WebDropDownList> 
</edititemtemplate>
                    <footertemplate>
<InfoLight:WebDropDownList id="wddWorkTime_YearHolidayDataTypeF" runat="server" DataMember="WorkTime_SV_YearType" Width="130px" DataSourceID="wdsWorkTime_SV_YearTypeDataType" DataValueField="Id" DataTextField="Name" FilterObject="" Filter="" DriverObject="" AutoInsertEmptyData="False" __designer:wfdid="w88" SelectedValue='<%# Bind("DataType") %>'></InfoLight:WebDropDownList> 
</footertemplate>
                    <itemtemplate>
<InfoLight:WebDropDownList id="wddWorkTime_YearHolidayDataTypeE" runat="server" DataMember="WorkTime_SV_YearType" Width="130px" DataSourceID="wdsWorkTime_SV_YearTypeDataType" DataValueField="Id" DataTextField="Name" OnlyShowSelectText="True" FilterObject="" Filter="" DriverObject="" AutoInsertEmptyData="False" __designer:wfdid="w86" Enabled="False" SelectedValue='<%# Bind("DataType") %>'></InfoLight:WebDropDownList>&nbsp;&nbsp; 
</itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DepartmentName" HeaderText="部门" SortExpression="DepartmentName" ReadOnly="True" />
                <asp:TemplateField HeaderText="请假单编号" SortExpression="SheetId">
                    <EditItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("SheetId") %>'></asp:Label>
                    </EditItemTemplate>
                    <ItemTemplate>
            <a href='WorkTimeLeave.aspx?sid=<%# Eval("SheetId") %>'><%# Eval("SheetId") %></a>
                    </ItemTemplate>
            </asp:TemplateField>
                <asp:BoundField DataField="Remark" HeaderText="备注" SortExpression="Remark"  />
</columns>
        <rowstyle backcolor="#EFF3FB"></rowstyle>
        <editrowstyle backcolor="#2461BF"></editrowstyle>
        <selectedrowstyle backcolor="#D1DDF1" forecolor="#333333" font-bold="True"></selectedrowstyle>
        <pagerstyle backcolor="LightBlue" forecolor="White" horizontalalign="Center"></pagerstyle>
        <headerstyle backcolor="DeepSkyBlue" forecolor="White" font-bold="True"></headerstyle>
        <alternatingrowstyle backcolor="White" bordercolor="White"></alternatingrowstyle>
        <addnewrowcontrols>
                <InfoLight:AddNewRowControlItem ControlID="wrvWorkTime_YearHolidayEmployeeIdF" ControlType="RefVal"
                    FieldName="EmployeeId" />
                <InfoLight:AddNewRowControlItem ControlID="wddWorkTime_YearHolidayDataTypeF" ControlType="DropDownList"
                    FieldName="DataType" />
                <InfoLight:AddNewRowControlItem ControlID="ZLYears" ControlType="TextBox" FieldName="Years" />
                <InfoLight:AddNewRowControlItem ControlID="TextBox1" ControlType="TextBox" FieldName="Days" />
            </addnewrowcontrols>
    </infolight:webgridview>
</asp:Content>
